#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import shutil
distPath="./dist/dog"
class Prod():
    def fis(self):
        os.system("sudo rm -rf {0}/*".format(distPath))
        os.system("sudo rm -rf {0}".format(self.staticPath))
        os.system("sudo fis3 server clean&&sudo fis3 release prod -d {0}".format(distPath))
    def pubzip(self):
        path_str = distPath
        os.system("chomd 777 {0}&&rm -rf {0}.tar".format(path_str))
        os.system("find . -name .DS_Store | xargs rm -f")
        os.system("mkdir "+self.staticPath+"/static")
        shutil.copytree(path_str+"/static",self.staticPath+"/static")
        os.system("7z a {0}.tar {0}".format(self.staticPath,path_str))

    def __init__(self):
        self.staticPath=distPath+"Wang"
        self.fis()
        self.pubzip()


prod = Prod()

